package com.wuyou.domain.po;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

@Data
@Document("house")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class MongoHouse {

    @Id
    @JsonSerialize(using = ToStringSerializer.class)
    private ObjectId id;

    /*
    *   房源id
    * */
    private Long hid;

    /*
    *   房源主题
    * */
    private String title;

    /*
    *   地理位置(经纬度) 如 : 121.4482236974557,31.196523937504549
    * */
    private Double[] loc;
}
